<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<table id="product_list_table" class="table table-striped table-bordered table-hover dataTable">
	<thead>
		<tr>
			<th class="center">
				<label>
					<input type="checkbox" class="ace" />
					<span class="lbl"></span>
				</label>
			</th>
			<th>编号</th>
			<th style="width: 350px;">主题</th>
			<th>商品<br/>分类</th>
			<th>价格</th>
			<th class="hidden-480">是否上架</th>
			<th>
				<i class="icon-time bigger-110 hidden-480"></i>
				创建日期
			</th>
			<th style="width: 135px;">操作</th>
		</tr>
	</thead>
	<tbody>
		<s:if test="productVOList != null && productVOList.size > 0">
			<s:iterator value="productVOList" var="productItem" status="countIdx">
				<tr>
					<td class="center">
						<label>
							<input type="checkbox" class="ace" lang="<s:property value='#productItem.productModel.id'/>" />
							<span class="lbl"></span>
						</label>
					</td>
					<td><s:property value='#productItem.productModel.sn'/></td>
					<td><s:property value='#productItem.productModel.fullName'/></td>
					<td><s:property value='#productItem.productModel.productCategoryModel.name'/></td>
					<td>
						<s:text name="format.number">
							<s:param value="#productItem.productModel.price"/>
						</s:text>
					</td>
					<td>
						<s:if test='#productItem.productModel.isMarketable'>
							<span class="label label-success arrowed">已上架</span>
						</s:if>
						<s:else>
							<span class="label label-danger arrowed-in">未上架</span>
						</s:else>
					</td>
					<td><s:date name='#productItem.productModel.createDate' format="yyyy-MM-dd"/></td>
					<td>
						<button onclick="preupdateproduct('<s:property value='#productItem.productModel.id'/>');" class="btn btn-xs btn-primary">
							<i class='icon-edit'></i>
							编辑
						</button>
						<button onclick="productDetail('<s:property value='#productItem.productModel.id'/>');" class="btn btn-xs btn-primary">
							<i class='icon-info-sign'></i>
							查看
						</button>
					</td>
				</tr>
			</s:iterator>
		</s:if>
		<s:else>
			<tr>
				<td colspan="13" style="text-align: center">暂无数据</td>
			</tr>
		</s:else>
	</tbody>
</table>
